﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ZengHuiGB.aspx.cs" Inherits="Web.Pages.YongShui.YongHuGL.ZengHuiGB" Theme="Default" %>

<%@ Register Assembly="DevExpress.Web.v15.2, Version=15.2.9.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" Namespace="DevExpress.Web" TagPrefix="dx" %>


<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title></title>    
    <style type="text/css">
    .left 
    {
        text-align:left;
    }
    .center 
    {
        text-align:center;
    }
    .right 
    {
        text-align:right;
    }
        table {
        width:100%
        }
        td {
            white-space:nowrap
        }
    </style>
    <script type="text/javascript">
        function keyEnter(index) {
            var controls = new Array();
            controls[0] = document.getElementById("txtMINGCHENG_I");
            controls[1] = document.getElementById("ddlGUANLIK_I");
            controls[2] = document.getElementById("ddlSUOSHUSF_I");
            controls[3] = document.getElementById("txtWENJIANMMGZ_I");
            var key = event.keyCode;
            if (key == 13) {
                index = index + 1;
                if (index == controls.length) {
                    index = 0;
                }
                controls[index].focus();
            }
        }
    </script>
</head>
<body>
<form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
            <div class="tabletitle1" align="center">
                增回灌表
            </div>
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
            <div style="border: 0px solid #4486a9; width: 99%; " class="left">
                <fieldset style="border: 1px solid  cornflowerblue">
                    <legend style="font-weight: bold">用户资料</legend>
                        <table  style="margin: auto;" class="TableLayoutFont">
                            <tr>
                                <td  width="100px" class="right">用户号：</td>
                                <td>
                                    <table>
                                        <tr>
                                            <td style="width:205px;">
                                                <dx:ASPxTextBox ID="TxtYongHuH" runat="server" Width="100px" MaxLength="7">
                                                    <ClientSideEvents KeyPress="function(s,e){var key = event.keyCode;
                                        if( key==13){$('#btnSearch').click();}}" />
                                                </dx:ASPxTextBox>
                                            </td>
                                            <td>
                                                 &nbsp;&nbsp;<dx:ASPxButton ID="btnSearch" runat="server" Text="查找" OnClick="btnSearch_Click"  UseSubmitBehavior="false" ></dx:ASPxButton>
                                            </td>
                                        </tr>
                                    </table>
                                    
                                   
                                </td>
                            </tr>
                            <tr>
                                <td class="right">用户名：</td>
                                <td>
                                    <table>
                                        <tr>
                                            <td>
                                                <dx:ASPxTextBox ID="TxtYongHuM" runat="server" Width="494px" Enabled="false"></dx:ASPxTextBox>
                                            </td>
                                        </tr>
                                    </table>
                                </td>
                            </tr>
                            <tr>
                                <td class="right">用户地址：</td>
                                <td>
                                   <table>
                                        <tr>
                                            <td>
                                                <dx:ASPxTextBox ID="TxtDiZhi" runat="server" Width="494px" Enabled="false"></dx:ASPxTextBox>
                                            </td>
                                        </tr>
                                    </table>                                    
                                </td>
                            </tr>                        
                        </table>
                        <br/>
                        <%--水表GridView--%>
                        <dx:ASPxGridView ID="gvShuiBiao" runat="server" AutoGenerateColumns="False" KeyFieldName="ID" Theme="Aqua1" Width="100%">
                            <Columns>
                                <dx:GridViewDataTextColumn FieldName="S_SHUIBIAOBH" Caption="水表号" Width="20%" HeaderStyle-HorizontalAlign="Center"></dx:GridViewDataTextColumn>
                                <dx:GridViewDataTextColumn FieldName="S_DIZHI" Caption="水表地址" Width="80%" HeaderStyle-HorizontalAlign="Center"></dx:GridViewDataTextColumn>
                            </Columns>
                            <Settings VerticalScrollableHeight="195" VerticalScrollBarMode="Auto" />
                        </dx:ASPxGridView>
                    </fieldset>
                </div>
                <br />
            <fieldset style="border: 1px solid  cornflowerblue">
                    <legend style="font-weight: bold">水表信息</legend>
                <br />
                <%--增加按钮--%>
                    <table style="width:500px">
                        <tr>
                            <td class="right" style="width:1%;padding-left:60px">
                                水表号：
                            </td>
                            <td style="width:150px">
                                <dx:ASPxTextBox ID="TxtShuiBiaoH" runat="server" MaxLength="20" Width="150px"></dx:ASPxTextBox>
                            </td>
                            <td>
                                <dx:ASPxButton ID="btnAdd" runat="server" Text="添加" OnClick="btnAdd_Click" UseSubmitBehavior="false"></dx:ASPxButton>
                            </td>
                        </tr>
                    </table>
                <br />
                <%--编辑区域--%>
                <div id="divEdit" runat="server" visible="false">
                <table>
                    <tr>
                        <td class="right" style="width:10%">水表类型：</td>
                        <td style="width:40%" >
                            <dx:ASPxComboBox ID="ddlShuiBiaoLX" runat="server" ValueType="System.String"></dx:ASPxComboBox>
                        </td>
                        <td class="right" style="width:10%">行政区：</td>
                        <td style="width:40%" >
                            <dx:ASPxComboBox ID="ddlXingZhengQ" runat="server" ValueType="System.String"></dx:ASPxComboBox>
                        </td>
                    </tr>
                    <tr>
                        <td class="right">
                            水表地址：</td>
                        <td colspan="3">
                            <dx:ASPxTextBox ID="txtShuiBiaoDZ" runat="server" MaxLength="200" Width="100%">
                                <ClientSideEvents KeyPress="function(s,e){keyEnter(0);}" />
                            </dx:ASPxTextBox>
                        </td>
                    </tr>
                    <tr>
                        <td class="right">
                            口径：</td>
                        <td>
                            <dx:ASPxTextBox ID="txtKouJing" runat="server" MaxLength="200" Width="100%">
                                <ClientSideEvents KeyPress="function(s,e){keyEnter(0);}" />
                            </dx:ASPxTextBox>
                        </td>
                        <td class="right">装表日期：</td>
                        <td>
                            <dx:ASPxDateEdit ID="dtZhuangBiaoRQ" runat="server" ClearButton-Text="清除" CalendarProperties-TodayButtonText="今天"></dx:ASPxDateEdit>
                        </td>
                    </tr>
                    <tr>
                        <td class="right"> 表册：</td>
                        <td>
                            <dx:ASPxTextBox ID="txtBiaoCe" runat="server" MaxLength="200" Width="100%">
                                <ClientSideEvents KeyPress="function(s,e){keyEnter(0);}" />
                            </dx:ASPxTextBox>
                        </td>
                        <td class="right">表型：</td>
                        <td>
                            <dx:ASPxTextBox ID="txtBiaoXing" runat="server" MaxLength="200" Width="100%">
                                <ValidationSettings ValidationGroup="group">
                                </ValidationSettings>
                                <ClientSideEvents KeyPress="function(s,e){keyEnter(0);}" />
                            </dx:ASPxTextBox>
                        </td>
                    </tr>
                </table>
                <br />
                <table id="GridViewButtonTable" runat="server" style="width: 100%">
                    <tr>
                        <td style="text-align: right;">
                            <dx:ASPxButton ID="btnSave" runat="server" Text="保存" OnClick="btnSave_Click" UseSubmitBehavior="false">
                                <ClientSideEvents Click="function(s, e) {
	                                if (ASPxClientEdit.ValidateGroup('group')) { 
                                            e.processOnServer = true; 
                                        } 
                                        else 
                                        { 
                                            e.processOnServer = false; 
                                        }
                                    }" />
                            </dx:ASPxButton>
                            <dx:ASPxButton ID="btnCancel" runat="server" Text="放弃" OnClick="btnCancel_Click"  UseSubmitBehavior="false">
                                </dx:ASPxButton>
                        </td>
                    </tr>
                </table>
            </div>
                </fieldset>
        </ContentTemplate>
    </asp:UpdatePanel>
</form>
</body>
</html>


